/**
 * 
 */
package org.rvk.vms.dal.entities;

import java.io.Serializable;
import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * The persistent class for the role database table.
 * 
 * @author Ashish Kumar Sinha <aksinha.mail@gmail.com>
 */
@Entity
@Table(name="role")
public class Role implements Serializable {

	private static final long serialVersionUID = 4605486630714800537L;

	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(unique=true, nullable=false)
	private int id;
	
	@Column(unique=true, nullable=false)
	private String code;
	
	@Column(nullable=false, length=128)
	private String name;
	
	@Column(length=2048)
	private String description;
	
	private int wopgId;
	
	@Column(nullable=false)
	private Timestamp updatedAt;
	
	@ManyToOne
	@JoinColumn(name="deptcode", nullable=false)
	private Department department;

	/**
	 * @return the id
	 */
	public int getId() {
		return id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(int id) {
		this.id = id;
	}

	/**
	 * @return the code
	 */
	public String getCode() {
		return code;
	}

	/**
	 * @param code the code to set
	 */
	public void setCode(String code) {
		this.code = code;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * @param description the description to set
	 */
	public void setDescription(String description) {
		this.description = description;
	}

	/**
	 * @return the wopgId
	 */
	public int getWopgId() {
		return wopgId;
	}

	/**
	 * @param wopgId the wopgId to set
	 */
	public void setWopgId(int wopgId) {
		this.wopgId = wopgId;
	}

	/**
	 * @return the updatedAt
	 */
	public Timestamp getUpdatedAt() {
		return updatedAt;
	}

	/**
	 * @param updatedAt the updatedAt to set
	 */
	public void setUpdatedAt(Timestamp updatedAt) {
		this.updatedAt = updatedAt;
	}

	/**
	 * @return the department
	 */
	public Department getDepartment() {
		return department;
	}

	/**
	 * @param department the department to set
	 */
	public void setDepartment(Department department) {
		this.department = department;
	}
	
}
